<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('read_difficults', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('company_id')->default(0)->index();
            $table->unsignedBigInteger('project_id')->default(0)->index();
            $table->unsignedBigInteger('admin_id')->default(0)->index();
            $table->string('number')->nullable()->comment('图纸编号');
            $table->string('name')->nullable()->comment('名称');
            $table->string('area')->nullable()->comment('区域（位置）');
            $table->string('analysis')->nullable()->comment('重难点分析');
            $table->string('node')->nullable()->comment('原图纸节点');
            $table->string('diagram')->nullable()->comment('效果图');
            $table->string('optimize_node')->nullable()->comment('优化节点');
            $table->string('optimization_practices')->nullable()->comment('优化做法特征');
            $table->string('remarks')->nullable()->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('read_difficults');
    }
};
